#!/usr/bin/python
# -*- coding : UTF-8 -*-
# ========================
# @Time  : 2020/6/4 10:41
# @Author: Mecell
# @File  : employee_param.py
# ========================

import re
import json

from common.yaml_packaging import YamlHandle
from database.asset_mysql import AssetMysql
from common.context_packaging import ContextHandle
from parameterize.user_param import UserContextHandle



class EmpContextHandle(ContextHandle):
    """
    定义员工管理参数化，反射功能的类
    """

    @classmethod
    def get_emp_info_parameterize(cls, data):
        """
        获取员工数据数据参数化
        :param data:
        :return:
        """
        if isinstance(data, dict):
            data = json.dumps(data)
        data = UserContextHandle.rep_admin_user_info(data)
        data = cls.rep_cur_emp_num(data)
        data = cls.rep_cur_emp_name(data)
        data = cls.rep_err_emp_num(data)
        return data










